package com.example.dessert.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import java.util.Date;

/**
 * @ClassName: User
 * @Description: 用户实体类
 * @Author li
 * @Date 2021/12/28
 * @Version 1.0
 */
public class User {
    private Long id;
    private String account;
    private String password;
    private String nickname;
    private Integer sex;
    private String description;

    //插入时自动填充
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;



    public Long getId() {
        return id;
    }

    public String getPassword() {
        return password;
    }

    public String getAccount() {
        return account;
    }

    public String getNickname() { return nickname; }

    public Integer getSex() { return sex; }

    public String getDescription() { return description; }


    public User setAccount(String account) {
        this.account = account;
        return this;
    }


    public User setPassword(String password) {
        this.password = password;
        return this;
    }

    public User setId(Long id) {
        this.id = id;
        return this;
    }

    public User setNickname(String nickname) {
        this.nickname = nickname;
        return this;
    }

    public User setSex(Integer sex) {
        this.sex = sex;
        return this;
    }

    public User setDescription(String description) {
        this.description = description;
        return this;
    }

}